﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Template.Master" Inherits="System.Web.Mvc.ViewPage<IPagedList<JLL.China.Model.Listings>>" %>

<%@ Import Namespace="JLL.China.Web.Libraries" %>
<%@ Import Namespace="JLL.China.Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <!--  start page-heading -->
    <div id="page-heading">
        <h1>
            <a class="icons icon-circle-arrow-right"></a>
           <b>Manage </b>
            <span class="show-listing">
                <% int statusID = Int32.Parse(ViewData["ListStatus"].ToString());
                   var strStatus = "All ";
                   if (statusID == 1)
                   {
                       strStatus = "Active ";
                   }
                   if (statusID == 2)
                   {
                       strStatus = "Draft ";
                   }
                   if (statusID == 3)
                   {
                       strStatus = "Deleted ";
                   } 
                %>
             
                <%=strStatus%> 
                 <% if (Session["heading"] != null)
               { %>
            <%=Session["heading"] %>
            <% Session["heading"] = null;
               } %></> </span>
        </h1>
    </div>
    <div class="menu-nav">
        <% Html.RenderPartial("TopMenu");%>
    </div>
    <!-- end page-heading -->
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="<%=Url.Content("~/Content/images/shared/side_shadowleft.jpg")%>" width="20"
                    height="300" alt="" />
            </th>
            <th class="topleft">
            </th>
            <td id="tbl-border-top">
                &nbsp;
            </td>
            <th class="topright">
            </th>
            <th rowspan="3" class="sized">
                <img src="<%=Url.Content("~/Content/images/shared/side_shadowright.jpg")%>" width="20"
                    height="300" alt="" />
            </th>
        </tr>
        <tr>
            <td id="tbl-border-left">
            </td>
            <td>
                <!--  start content-table-inner ...................................................................... START -->
                <div id="content-table-inner">
                    <% Html.RenderPartial("Measage");%>
                    <% Html.RenderPartial("Listings", this.Model);%>
                </div>
             </td>
            <td id="tbl-border-right">
            </td>
        </tr>
        <tr>
            <th class="sized bottomleft">
            </th>
            <td id="tbl-border-bottom">
                &nbsp;
            </td>
            <th class="sized bottomright">
            </th>
        </tr>
    </table>
    <!--  end table-content  -->
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CSS" runat="server">
    <link href="<%=Url.Content("~/Scripts/qtip2/jquery.qtip.min.css") %>" rel="stylesheet"
        type="text/css" />
        <link href="<%=Url.Content("~/Scripts/chosen/chosen.css")%>" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="JS" runat="server">

       <script src="<%=Url.Content("~/Scripts/knockout/knockout.js")%>" type="text/javascript"></script>

    <script src="<%=Url.Content("~/Scripts/knockout/knockout.mapping.js")%>" type="text/javascript"></script>

    <script src="<%=Url.Content("~/Scripts/jqueryui/jquery.ui.core.js")%>" type="text/javascript"></script>

    <script src="<%=Url.Content("~/Scripts/jqueryui/jquery.ui.widget.js")%>" type="text/javascript"></script>

    <script src="<%=Url.Content("~/Scripts/jqueryui/ui.checkbox.js")%>" type="text/javascript"></script>

    <script src="<%=Url.Content("~/Scripts/jqueryui/jquery.bind.js")%>" type="text/javascript"></script>

    <script src="<%=Url.Content("~/Scripts/jquery.pngFix.pack.js")%>" type="text/javascript"></script>

    <script src="<%=Url.Content("~/Scripts/jquery.selectbox-0.5.js")%>" type="text/javascript"></script>

    <script src="<%=Url.Content("~/Scripts/jquery.selectbox-0.5_style_2.js")%>" type="text/javascript"></script>
<script src="<%=Url.Content("~/Scripts/chosen/chosen.jquery.min.js")%>" type="text/javascript"></script>
    <script src="<%=Url.Content("~/Scripts/qtip2/jquery.qtip.min.js")%>" type="text/javascript"></script>

    <script src="<%=Url.Content("~/Scripts/Run.js")%>" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $(".czselect").chosen({ disable_search_threshold: 8, allow_single_deselect: true });
            //
             $(".preview").click(function(e) {
                e.preventDefault();
                openWindow(this.href);
            });
              //Ajax 
            $(".ajaxSubmit").click(function(e) {
                e.preventDefault();
                var obj = $(this);
                var pagelink = obj.attr('href');
                
                $.ajax({
                    url: pagelink,
                    success: function(data) {
                        jSuccess(
                            '<div class="msgnotify"><b>Save successfully</b></div>',
                            {
                                autoHide: true, // added in v2.0
                                HorizontalPosition: 'center',
                                VerticalPosition: 'top',
                                onClosed: function() { // added in v2.0
                                    window.location = window.location.href;
                                }
                            });

                    }
                });
            });
        });
        
    </script>
</asp:Content>
